{extend name="public:base" /}
{block name="content"}
	<!-- 搜索 开始 -->
	<div class="back_btn">
        <!-- 返回按钮 -->
        <button class="btn btn_color" type="button" style="outline: none;">
            <a href="{:url('index/index')}"><span class="glyphicon glyphicon-arrow-left" style="color:#3c8dbc;font-size: 18px;" ></span></a>
        </button>
        <!-- 输入id查询 -->
        <div class="search d3 search_b">
            <form method="post" action="{:url('search')}">
                <input type="text" placeholder="请输入ID或手机号..." name="number" value="{$search}">
                <input type="hidden" name="s" value="9">
                <button type="submit"> <span class="glyphicon glyphicon-search" style="color:#fff;font-size: 18px;"></span></button>
            </form>
        </div>
    </div>
    <!-- 搜索 结束 -->


    {if condition="$list eq 'noselect'"}
        没有数据,请查询
        {if condition="($s eq 9) and ($Think.session.admin_user.depar_id eq 4)"}
        <!--<a class="url" url="{:url('index/jiandan')}"><button type="button" id="btn_pro" >是否建单</button></a>-->
        <a href="{:url('index/jiandan')}"><button type="button" id="btn_pro" >是否建单</button></a>
        {/if}
    {else /}
    <!-- 列表 -->
    <table class="table table-bordered table_color">
        <thead>
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>电话</th>
            <th>建单时间</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>
        {volist name='list' id="vo" }
        <tr role="button" data-toggle="collapse" href="#collapse_one" aria-expanded="false" aria-controls="collapseExample">

            <td>{$vo.id}</td>
            <td>{$vo.name}</td>
            <td>{$vo.maphone}</td>
            <td>{$vo.jdtime|strtotime|date="Y-m-d",###}</td>
            <td><span class="color{$vo.ywstate}">{$vo.state_text}</span></td>
        </tr>
        <tr id="details_open" style="background: none;border:0;">
            <td colspan="6" style="background: none;padding:0;">
                <div class="collapse" id="collapse_one">
                    <div class="well">
                        <ul class="details_ul details_oth">
                            <li>姓名：{$vo.name}</li>
                            <li>妈妈电话：{$vo.maphone}</li>
                            <li>其他电话：{$vo.otherphone}</li>
                            <li>微信：{$vo.weixin}</li>
                            <li>QQ：{$vo.qq}</li>
                            <li>预产期：{eq name="vo.yctime" value="1970-01-01"}{else/}{$vo.yctime}{/eq}</li>
                            <li>分类：{$vo.lbxx_text}</li>
                            <li>地区：{$vo.area_text}</li>
                            <li>医院：{$vo.yyxx_text}</li>
                            <li>渠道：{$vo.qdxx_text}</li>
                            <li>业务状态：<span class="color{$vo.ywstate}">{$vo.state_text}</span></li>
                            <li>预约拍摄时间:{eq name="vo.yypstime" value="1970-01-01 8:00"}{else/}{$vo.yypstime}{/eq}</li>
                            <li>取消拍摄时间:{eq name="vo.qxpstime" value="1970-01-01"}{else/}{$vo.qxpstime}{/eq}</li>
                            <li>未到拍摄时间:{eq name="vo.wdpstime" value="1970-01-01"}{else/}{$vo.wdpstime}{/eq}</li>
                            <li>邀约客服：{$vo.yykf_text}</li>
                            <li>追踪日期:{eq name="vo.zztime" value="1970-01-01"}{else/}{$vo.zztime}{/eq}</li>
                            <li>预约场馆:{$vo.yycg_text}</li>
                            <li><span class="tanchu" data-toggle="tooltip" data-placement="right" title="{$vo.qdbz}">渠道备注:{$vo.qdbz|msubstr=0,4}</span></li>
                            <li><span class="tanchu" data-toggle="tooltip" data-placement="right" title="{$vo.yybz}">邀约备注：{$vo.yybz|msubstr=0,4}</span></li>
                            <li><span class="tanchu"  data-toggle="tooltip" data-placement="right" title="{$vo.psbz}">拍摄备注:{$vo.psbz|msubstr=0,4}</span></li>
                            <li>活动门店：{$vo.hsmd_text}</li>
                            <li>会所组员：{$vo.hszy_text}</li>
                            <li>会所状态：{$vo.hszt_text}</li>
                            <li>课程信息:{$vo.kcxx_text}</li>
                            <li>建单人员:{$vo.jdry_text}</li>
                            <li>部门：{$vo.bumen_text}</li>
                            <li>建单日期：{eq name="vo.jdtime" value="1970-01-01 8:00"}{else/}{$vo.jdtime}{/eq}</li>
                            <li>反馈人员名字：{$vo.fkry_text}</li>
                            <li>渠道备注：{$vo.qdbz}</li>
                        </ul>
                    </div>
                </div>
            </td>
        </tr>

        </tbody>
    </table>
        <!-- 推送 pushweixin-->
        <a class="url" href="#" url="{:url('pushweixin',['id'=>$vo['id']])}"><button type="button" id="btn_pro" class="btn_pro"  >推送到微信</button></a>
{/volist}
    {/if}
<script type="text/javascript" src="__JS__/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/moment.js"></script>
<script type="text/javascript" src="__JS__/daterangepicker.js"></script>
<script type="text/javascript" src="__JS__/index.js"></script>
    <script type="text/javascript" src="__JS__/calendar.js"></script>
    <script type="text/javascript" src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/yewu.js"></script>
    <script type="text/javascript">
        /*$(function(){
            $('.btn_pro').click(function(){
                layer.confirm('是否推送到微信？', {
                  btn: ['是','否'] //按钮
                }, function(){
                  layer.msg('推送成功', {icon: 1});
                }, function(){
                  layer.msg('是否返回', {
                    time: 20000, //20s后自动关闭
                    btn: ['是', '否']
                  });
                });
            })
        });*/
        $('.url').click(function () {
            var a= $(this).attr('url');
            $.get(a,  function (data) {
//                console.log(data);
                if (data.status != 1) {
                    layer.msg(data.msg, {icon: 5}, function (index) {
                        layer.close(index);
                    });
                    return false;
                }else{
                    location.href = data.url;
                }
            }, "json");
            return false;
        });
    </script>
{/block}